From: kaf24@firebug.cl.cam.ac.uk Date: Tue, 20 Sep 2005 09:05:03 +0000 (+0000) Subject: Fix an operand size bug in the VMX MMIO decoder. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~16780^2~35^2~2 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=bc6ef390faf4648d3cca12e68315512aebcf0db7;p=xen.git Fix an operand size bug in the VMX MMIO decoder. Signed-off-by: Chengyuan Li --- diff --git a/xen/arch/x86/vmx_platform.c b/xen/arch/x86/vmx_platform.c index b585c4c420..d7ef47d718 100644 --- a/xen/arch/x86/vmx_platform.c +++ b/xen/arch/x86/vmx_platform.c @@ -671,13 +671,13 @@ static void mmio_operands(int type, unsigned long gpa, struct instruction *inst, if (inst->operand[0] & REGISTER) { /* dest is memory */ index = operand_index(inst->operand[0]); value = get_reg_value(size, index, 0, regs); - send_mmio_req(type, gpa, 1, size, value, IOREQ_WRITE, 0); + send_mmio_req(type, gpa, 1, inst->op_size, value, IOREQ_WRITE, 0); } else if (inst->operand[0] & IMMEDIATE) { /* dest is memory */ value = inst->immediate; - send_mmio_req(type, gpa, 1, size, value, IOREQ_WRITE, 0); + send_mmio_req(type, gpa, 1, inst->op_size, value, IOREQ_WRITE, 0); } else if (inst->operand[0] & MEMORY) { /* dest is register */ /* send the request and wait for the value */ - send_mmio_req(type, gpa, 1, size, 0, IOREQ_READ, 0); + send_mmio_req(type, gpa, 1, inst->op_size, 0, IOREQ_READ, 0); } else { printf("mmio_operands: invalid operand\n"); domain_crash_synchronous();